package exttable.view;

import utils.Localisation;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Jan 27, 2010
 * Time: 9:25:04 AM
 * To change this template use File | Settings | File Templates.
 */
public class ViewTestComboBox extends ViewLocales implements ILocalsation {

    private final String id;
    private final String analysName;

    public String getAnalysName() {
        return analysName;
    }

    public static class Build implements IBuilder {
        private String id;
        private String nameRu;
        private String nameKz;
        private String nameEn;
        private String analysisName;


        public Build id(String id) {
            this.id = id;
            return this;
        }

        public Build nameRu(String nr) {
            this.nameRu = nr;
            return this;
        }

        public Build nameEn(String ne) {
            this.nameEn = ne;
            return this;
        }

        public Build nameKz(String nk) {
            this.nameKz = nk;
            return this;
        }

        public Build analysisName(String analysName) {
            this.analysisName = analysName;
            return this;
        }

        public ViewTestComboBox build() {
            return new ViewTestComboBox(this);
        }
    }

    public ViewTestComboBox(Build build) {
        id = build.id;
        setNameRu(build.nameRu);
        setNameEn(build.nameEn);
        setNameKz(build.nameKz);
        analysName = build.analysisName;
    }

    public String getId() {
        return id;
    }


    @Override
    public String toString() {
        return Localisation.getMsg(this);
    }
}
